<!--
 * @Author: HeAo
 * @Date: 2021-10-08 11:17:47
 * @LastEditTime: 2021-10-08 11:33:56
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \web2103-2105\web2105\3-2-Vue\day01\3-vue模板语法.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
</head>

<body>
  <div id="app">
    {{boolean}}
    {{boolean + 'hello'}}
    {{boolean? '登录': '退出'}}
    <div v-bind:title="title">指令</div>
    <div :title="title" :data-msg="msg">指令</div>
    <div style="width: 200px;height: 200px;border: 1px solid #ccc;">
      <div v-html="htmlCode">

      </div>
    </div>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        boolean: false,
        title: 'hello',
        msg: 'hello vue',
        htmlCode: `<div>
          <h1>h1</h1>
          <h2>h2</h2>
          <h3>h3</h3>
          <h4>h4</h4>
          <h5>h5</h5>
        </div>`
      },
      methods: {},
      created() { }
    })
  </script>
</body>

</html>